<template>
  <div ref="app-secondary">
    {{ number }}
    <button @click="handleClick">逻辑控制事件触发样例</button>
  </div>
</template>

<script>
import platformMixin from "@/mixins/platform.js"

export default {
  name: "Main",
  props: {
    vueProps: Object
  },
  mixins: [platformMixin],
  computed: {},
  data() {
    return {
      number: 1
    }
  },
  mounted() {
    this.vueProps.eventBus?.on((newProps) => {

    })
    this.triggerEvent?.("mounted")
    this.initComData()
  },
  methods: {
    handleClick() {
      this.triggerEvent?.("click", { value: "123" })
    },
    //action样例
    do_EventCenter_message({ value }) {
      alert(value)
    },
    initComData() {
      const { customConfig } = this.vueProps
      customConfig.number && (this.number = customConfig.number)
    }
  }
}
</script>
